<?php
define ('DIRSEP', DIRECTORY_SEPARATOR);
$site_path = realpath(dirname(__FILE__) . DIRSEP . '..' . DIRSEP) . DIRSEP;
define ('SITE_PATH', $site_path);

include '../functions/functions.php';
$filepath = '../xml/ajax_mapping.xml';
$module_name = getValue('name','str','POST','');
if($module_name){
	$xml = new XMLReader;
	$xml->open($filepath);
	while($xml->read()){
		if($xml->getAttribute('name')==$module_name){
			$path = $xml->getAttribute('path');
			
		}	
	}
	if(isset($path)){
        include SITE_PATH.$path.'.php';
    } 
    else echo 'missing module';     
}
?>